//package com.dongdongshop.service.impl;
//
//import com.dongdongshop.mapper.TbUserMapper;
//import com.dongdongshop.pojo.TbUser;
//import com.dongdongshop.pojo.TbUserExample;
//import com.dongdongshop.service.TbUserService;
//import org.apache.dubbo.config.annotation.DubboService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
//@Service
//@DubboService
//public class TbUserServiceImpl implements TbUserService {
//    @Autowired
//    private TbUserMapper userMapper;
//    @Override
//    public TbUser selectByUsername(String username) {
//        TbUserExample example = new TbUserExample();
//        TbUserExample.Criteria criteria = example.createCriteria();
//        criteria.andUsernameEqualTo(username);
//        List<TbUser> tbUsers = userMapper.selectByExample(example);
//        return tbUsers.size() > 0 ? tbUsers.get(0) : null;
//    }
//
//    @Override
//    public void addUser(TbUser user) {
//        userMapper.insertSelective(user);
//    }
//
//    @Override
//    public void orderScore(Long id, String s) {
//
//    }
//}
